package servlets;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import modele.Personne;

public class ModifierProfil extends HttpServlet {

	protected void doGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		// Personne user = (Personne)
		// request.getSession(true).getAttribute("user");
		getServletContext().getRequestDispatcher("/WEB-INF/profil.jsp")
				.forward(request, response);
	}

	protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		// On récupère les éléments de profil.jsp
		String nom = request.getParameter("nom");
		String prenom = request.getParameter("prenom");
		String password = request.getParameter("password");
		String email = request.getParameter("email");
		String date_naissance = request.getParameter("date_naissance");
		String telephone = request.getParameter("telephone");
		String adresse = request.getParameter("adresse");
		String code_postal = request.getParameter("code_postal");
		String ville = request.getParameter("ville");


		// Comme on a récupéré le cp sous forme de String, on le transforme en int,
		// on doit les transformer en int
		int codePostal = Integer.parseInt(code_postal);

	}

}
